home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3606 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.0 KB  |  46 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: news.nask.org.pl!cyfronet!student!iskra
  3. From: iskra@student.uci.agh.edu.pl (Kamil Iskra)
  4. Subject: Re: Update to Native Developer Kit 3.1: Request for ideas
  5. Message-ID: <Dn668q.5Kr@cyf-kr.edu.pl>
  6. Sender: news@cyf-kr.edu.pl (News Administrator)
  7. Nntp-Posting-Host: student.uci.agh.edu.pl
  8. Organization: Academic Computer Centre, CYFRONET
  9. X-Newsreader: TIN [version 1.1 PL8]
  10. References: <1005.6624T1300T707@teclink.net>
  11. Date: Thu, 22 Feb 1996 08:58:02 GMT
  12.  
  13. rad (rad@teclink.net) wrote:
  14. > The thing I would like most to see in an update is the correcting of
  15. > prototypes in headers to indicate when constant pointers can be passed.
  16.  
  17. > (e.g. in clib/dos.h:
  18.  
  19. > BPTR Open (CONST STRPTR name, long accesMode);
  20. > LONG Write (BPTR file, CONST APTR buffer, long length);
  21. > LONG DeleteFile (CONST STRPTR name);
  22. > LONG Rename (CONST STRPTR oldName, CONST STRPTR newName);
  23. > BPTR Lock (CONST STRPTR name, long type);
  24.  
  25. Good point! It would make programming easier and would let compilers make
  26. more optimizations in some cases. 
  27.  
  28. Another thing in this subject that needs updating is converting all UBYTE*
  29. (and maybe char*, too) to STRPTR - they cause huge amount of warnings when
  30. compiling in C++, which uses stricter pointer checking and will not ignore
  31. "char*" <-> "unsigned char*" mismatches. 
  32.  
  33. Another thing is including all necessary headers before declaring
  34. prototypes in "clib" files. As "necessary" I mean headers that contain
  35. structures which are used in prototypes. ANSI C says that scope of
  36. structures implicitly declared in prototypes ends with the end of... 
  37. prototype! This effectively makes this prototypes useless. Many compilers,
  38. including SAS/C, work well with such code, but GNU CC does not and is
  39. *right* - this is violation of ANSI standard. 
  40.  
  41. --
  42. / Kamil Iskra - AMIGA 1200, 68030 50MHz, HDD 850 MB, 10 MB RAM \
  43. | iskra@student.uci.agh.edu.pl  kiskra@ernie.icslab.agh.edu.pl |
  44. | http://student.uci.agh.edu.pl/~iskra                         |
  45. \ PGP public key available via Finger or WWW                   /
  46.